Interaction Data Summary Statistics
Warning: package 'dplyr' was built under R version 4.5.2
set.seed (44 )
df <- read.csv (here:: here ("../Avian-Interaction-Database-Working/L1/ain_cac.csv" ))
spp <- read.csv (here:: here ("./data/L1/species_checklists/spp_joint_cac_colsubset.csv" ))
num_intxns <- nrow (df)
unique_intxns <- df %>%
dplyr:: select (species1_scientific,
species2_scientific,
effect_sp1_on_sp2,
effect_sp2_on_sp1,
interaction) %>%
filter (! duplicated (.))
num_unique_intxns <- nrow (unique_intxns)
num_focal_spp <- length (unique (df$ species1_scientific))
unique_spp_list <- unique (c (df$ species1_scientific, df$ species2_scientific))
num_total_spp <- length (unique_spp_list)
num_new_spp2 <- length (setdiff (unique_spp_list, df$ species1_scientific))
unique_spp_list_names <- unique (spp$ scientific_name_clements2024)
unique_spp1_ain_names <- unique (df$ species1_scientific)
Number of documented pairwise interactions: 25958
Number of unique pairwise interactions: 20913
Number of focal species: 923
Number of additional non-focal spp: 1199
Number of species (total): 2122
Percent of world’s bird spp (out of 11,1145 spp): 19.04
Total number of migratory species: [Not sure how to calculate this]
Total number of interaction types: 25
Species list summary
Total number of species in the North American Avian Interaction Species List: 777
unique_intxns %>% group_by (interaction) %>% summarize (n= n ()) %>% arrange (- n)
# A tibble: 25 × 2
interaction n
<chr> <int>
1 predation 5401
2 competition 3132
3 co-occur 2203
4 brood parasitism 1523
5 facilitation 1450
6 commensalism 1095
7 mobbing 940
8 communal nesting 920
9 communal roosting 721
10 facilitation-mixed flocking 714
# ℹ 15 more rows